const getList = (author,keyword)=>{
//先返回假数据
return[
  {
    id:1,
    title:'标题A',
    content:'内容A',
    createTime:'11546610491112',
    author:'张三'
  },
  {
    id:2,
    title:'标题B',
    content:'内容B',
    createTime:'11546610491112',
    author:'李四'
  },
  {
    id:3,
    title:'标题C',
    content:'内容C',
    createTime:'11546610491112',
    author:'王二'
  }
]

}

const getDetail = (id)=>{
  return[
    {
      id:1,
      title:'标题A',
      content:'内容A',
      createTime:'11546610491112',
      author:'张三'
    } 
  ]  
}
  
const newBlog = (blogData={}) => {
  //title content
  console.log('new:',blogData)
  return[
    {
      id:3
    } 
  ]  
}

const updateBlog = (blogData={}) => {
  //id 要更新的 title content
  console.log('更新:',blogData)
  return true 
}

const delBlog = (id) => {
  return true 
}

module.exports ={
  getList,
  getDetail,
  newBlog,
  updateBlog,
  delBlog
}